// <copyright file="DatabaseRegistry.cs" company="Clever Software">
// Copyright (c) 2013, 2014 All Right Reserved, http://www.cleversoftware.by
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Clever Software</author>
// <email>info@cleversoftware.by</email>
// <date>2014-02-04</date> 
// <summary>CleverCMS source code</summary>

namespace CleverCMS.Cms.Services.Infrastructure
{
    using CleverCMS.Cms.Data;
    using CleverCMS.Cms.Data.Entities;
    using StructureMap.Configuration.DSL;

    public class CmsDatabaseRegistry : Registry
    {
        public CmsDatabaseRegistry()
        {
            For<CmsDataContext>().Use<CmsDataContext>();
                        
            For<IPageRepository>().Use<PageRepository>();
            For<ISettingRepository>().Use<SettingRepository>();
            For<IMenuRepository>().Use<MenuRepository>();
            For<IMenuItemRepository>().Use<MenuItemRepository>();
            
            For<ICmsGenericRepository<UserProfile>>().Use<CmsGenericRepository<UserProfile>>();
            For<ICmsGenericRepository<CmsMenuType>>().Use<CmsGenericRepository<CmsMenuType>>();
            For<ICmsGenericRepository<Role>>().Use<CmsGenericRepository<Role>>();
            For<ICmsGenericRepository<CmsTag>>().Use<CmsGenericRepository<CmsTag>>();
            For<ICmsGenericRepository<CmsPageCategory>>().Use<CmsGenericRepository<CmsPageCategory>>();
            For<ICmsGenericRepository<CmsStatus>>().Use<CmsGenericRepository<CmsStatus>>();
            For<ICmsGenericRepository<CmsLog>>().Use<CmsGenericRepository<CmsLog>>();
            For<ICmsGenericRepository<CmsPageComment>>().Use<CmsGenericRepository<CmsPageComment>>();
            For<ICmsGenericRepository<CmsRating>>().Use<CmsGenericRepository<CmsRating>>();
        }
    }
}